module.exports = {
  formatDateTime(data) {
    var date = data;
    var y = date.getFullYear();
    var m = date.getMonth() + 1;
    var d = date.getDate();
    var w = date.getDay();
    var w1 = [
      "星期日",
      "星期一",
      "星期二",
      "星期三",
      "星期四",
      "星期五",
      "星期六",
    ];
    var h = date.getHours();
    h = h < 10 ? "0" + h : h;
    var min = date.getMinutes();
    min = min < 10 ? "0" + min : min;
    var s = date.getSeconds();
    s = s < 10 ? "0" + s : s;
    return (
      y + "年" + m + "月" + d + "日" + h + ":" + min + ":" + s + " " + w1[w]
    );
  },
};
